import React, { PureComponent } from 'react';
import { Modal, List, InputItem, WhiteSpace, Button, WingBlank, Menu, ActivityIndicator, NavBar, TabBar, Card, Flex } from 'antd-mobile';
import { connect } from 'dva';
import teacher from './index.less';
import { Divider } from 'antd';
class Teacher extends React.Component {
  constructor(props) {
    super(props);
    this.state = {

    };
  }
  componentWillMount() {
    this.props.dispatch({ type: "teaIndex/getUserInfos" })
  }

  render() {
    return (
      <div>
        <p className={teacher.titleH2}>我的课表</p>
        <div style={{ overflow: "hidden" }}>
          <div className={teacher.title}>上课时间</div>
          <div className={teacher.title}>上课地点</div>
          <div className={teacher.title}>课程名称</div>
        </div>
        <ul className={teacher.listUl}>
          {this.props.info == "" ? null : this.props.info.map((s,key) => {
            return (<li key={key} className={teacher.listll}><span className={teacher.listSpan}>{s.attendClass}</span><span className={teacher.listSpan}>{s.roomName}</span><span className={teacher.listSpan}>{s.courseName}</span></li>)
          })}
        </ul>
      </div>

    );
  }
}
function mapStateToProps(state) {
  return {
    info: state.teaIndex.info
  }
}
export default connect(mapStateToProps)(Teacher);
